# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mqtt-exec
pkgver=0.5
pkgrel=1
pkgdesc="simple MQTT client that executes a command on messages"
url="https://github.com/ncopa/mqtt-exec"
arch="all"
license="MIT"
makedepends="$depends_dev mosquitto-dev"
options="!check" # no checks available.
subpackages="$pkgname-dbg $pkgname-openrc"
source="mqtt-exec-$pkgver.tar.gz::https://github.com/ncopa/mqtt-exec/archive/v$pkgver.tar.gz
	mqtt-exec.initd
	mqtt-exec.confd
	"

build() {
	make
}

package() {
	install -D mqtt-exec "$pkgdir"/usr/bin/mqtt-exec
	install -Dm755 "$srcdir"/mqtt-exec.initd \
		"$pkgdir"/etc/init.d/mqtt-exec
}

sha512sums="
55746aabe17d47153c01549a65f0db9278a39dc642e355b8416e905934a3abe233eb0ad763ae8add08bf6c3ad8ccaa97e9bac4372c8af6fea522f6670378acd7  mqtt-exec-0.5.tar.gz
f8cab7fe709fc80b3a75f1d65d55e10c05a4b27e319a9190d3ee78050fea86d8c6512e3d624b8b413dab01b2043bed5f672453090251b93d261d79125f9f0d17  mqtt-exec.initd
e5cce69f5ad1f0fcf0eb0be7675c2f4ca4ba5518e8303adb16673b7e402dbe8d48b57c4b4512a0d3aba4541241d2ddeca68b88354d089606f67a5549508b44b5  mqtt-exec.confd
"
